export function canRemove(
  map: number[][][],
  level: number,
  row: number,
  col: number
) {
  for (let i = level + 1; i < map.length; i++) {
    const levelMap = map[i]
    for (let r = row - 1; r <= row + 1; r++) {
      for (let c = col - 1; c <= col + 1; c++) {
        if (levelMap[r] && levelMap[r][c]) {
          return false
        }
      }
    }
  }
  return true
}

export function getImageUrl(name: string) {
  return new URL(`./assets/${name}.png`, import.meta.url).href
}
